#pragma once

#include "Type.h"
#include "DecoratedType.h"

class CClass;
class RObject;
class CPlaceholderType;

//type of TSharedObjectPtr<T> 
class WHENGINE_API CSharedObjectPtrType: public CType
{
public:
    CSharedObjectPtrType();

    static CSharedObjectPtrType* GetStaticType();

    static CString CreateTypeName(const CString& ElementType);
    static STypeID CreateID(const SDecoratedType & ElementType);
    static STypeID CreateID(const STypeID & ClassType);
protected:
    static CString PlaceholderName;

};

//type of TSharedObjectPtr<ObjectType> 
class WHENGINE_API CObjectPtrTypeGeneralized: public CType
{
public:
    CObjectPtrTypeGeneralized(CClass *InClass);

    static CObjectPtrTypeGeneralized* FindClassSharedObjectPtrType(CClass* InClass);

    CClass* GetObjectClass() const;

    //convert a object ptr to a shared object ptr
    void SetObjectPtr(void* Instance, RObject* InObject);
    RObject* GetObjectPtr(void* Instance);

    // static CString CreateTypeName(CClass* InClass);
    // static CString CreateTypeName(const CString & InClassName);
protected:
};
